1. Field of the Invention
The present invention relates to electronic databases and, more specifically, to a method of obtaining data from a database that is independent of its schema.
2. Description of the Related Technology
In the most general sense, a database is a collection of data. Various architectures have been devised to organize data in a computerized database. Typically, a computerized database includes data stored in mass storage devices, such as tape drives, magnetic hard disk drives and optical drives. The three principle architectures are termed hierarchical, network and relational. A hierarchical database, such as the IMS product from IBM, assigns different data types to different levels of the hierarchy. Links between data items on one level and data items on a different level are simple and direct. However, a single data item can appear multiple times in a hierarchical database and this creates data redundancy. To eliminate data redundancy, a network database, such as that proposed by the Committee for Data System Languages, stores data in nodes having direct access to any other node in the database. There is no need to duplicate data since all nodes are universally accessible. Lastly, in a relational database, the basic unit of data is a relation. A relation comprises attributes and tuples.
In an implementation of a relational database, a relation corresponds to a table having rows, where each row corresponds to a tuple, and columns, where each column corresponds to an attribute. From a practical standpoint, rows represent records of related data and columns identify individual data elements. A table defining a retailer's product line may, for example, have product names, product numbers (e.g., Stock Keeping Units or SKUs) and prices. Each row of this table holds data for a single product and each column holds a single attribute, such as a product name. The order in which the rows and columns appear in a table has no significance. In a relational database, one can add a new column to a table without having to modify older applications that access other columns in the table. Relational databases thus provide flexibility to accommodate changing needs.
All databases require a consistent structure, termed a schema, to organize and manage the information. In a relational database, the schema is a collection of tables. Similarly, for each table, there is generally one schema to which it belongs. Once the schema is designed, a tool, known as a database management system (DBMS), is used to build the database and to operate on data within the database. The DBMS stores, retrieves and modifies data associated with the database. Lastly, to the extent possible, the DBMS protects data from corruption and unauthorized access.
A human user controls the DBMS by providing a sequence of commands selected from a data sublanguage. The syntax of data sublanguages varies widely, including, for example, QUEL (Ingres Corporation), RDML (Digital Equipment Corporation) and SQL/DS (BDM). Fortunately, the American National Standards Institute (ANSI) and the International Organization for Standardization (ISO) have adopted Structured English Query Language (SQL) as a standard data sublanguage for relational databases. The current version of the SQL standard is SQL-92 (ANSI Document No. X3.135-1992). SQL comprises a data definition language (DDL), a data manipulation language (DML), and a data control language (DCL). DDL allows users to define a database, to modify its structure and to destroy it. DML provides the tools to enter, modify and extract data from the database. DCL provides tools to protect data from corruption and unauthorized access. Although SQL is standardized, most implementations of the ANSI standard have subtle differences. Nonetheless, the standardization of SQL has greatly increased the utility of relational databases for many applications, including retail sales and merchandising operations, which are of particular interest to the present invention.
Although access to relational databases is facilitated by standard data sublanguages, users still must have detailed knowledge of the schema to obtain needed information from a database since one can design many different schemas to represent the storage of a given collection of information. For example, in an electronic merchandising system, a merchant may elect to store product information, such as product SKU, product name, product description, price, and tax code, in a single table within a relational database. Another merchant may elect to store product SKU, product name, description, and tax code in one table while product SKU and product price are stored in a separate table. In this situation, a SQL query designed to retrieve a product price from one merchant's database is not useful for retrieving the price for the same product in the other merchant's database because the differences in schemas require the use of different SQL queries to retrieve product price. As a consequence, developers of retail applications accessing product information from relational databases have to adapt their SQL queries to each individual schema. This, in turn, prevents their applications from being used in environments where there are a wide variety of databases having different schemas, such as the World Wide Web.
The rapid development of the World Wide Web (Web) facilitates the use of online merchant systems. Online merchant systems enable merchants to creatively display and describe their products to a global audience of shoppers using Web pages defined by hypertext markup language (HTML). HTML enables merchants to layout and display content, such as text, pictures, sound and video. Web shoppers access a merchant's page using a browser, such as Microsoft Explorer or Netscape Navigator, installed on a client connected to the Web through an online service provider, such as the Microsoft Network or America OnLine. The browser interprets the HTML to format and display the merchants page for the shopper. The online merchant system likewise enables shoppers to browse through a merchant's store to identify products of interest, to obtain specific product information and to electronically purchase products after reviewing product information. Merchants often store product data, such as product descriptions, prices and pictures, in legacy relational databases. Online merchant systems, therefore, have to interface with merchant databases to access and display product information. As each merchant organizes their product information differently, there is a large installed base of databases having a wide variety of database schemas for product information.
Available online merchant systems, such as eShop 1.0 and Netscape Merchant system, require that merchants organize their product information according to a predefined database schema. Hence, to use such systems, a merchant must either convert its existing databases to this predefined schema or the merchant must create a new database having the predefined schema. For many merchants, conversion of their existing databases is not feasible. For example, the merchant may have several hundred thousand product entries located in different remote databases accessed by legacy applications, such as a point of sale system or an inventory control system, specifically designed to interact with these different databases. If the merchant converted these databases to the predefined schemas, their legacy applications would no longer function properly. To protect their investment in legacy applications, merchants may have to copy their product data into a redundant database having the predefined schema. Otherwise, merchants may have to incur substantial costs to rewrite their legacy applications to support the predefined schema of the online merchant system. For these reasons, it is not cost-effective for a merchant to use applications requiring a predefined schema for existing relational databases. To enter the online merchant market, merchants require an online merchant system that will cooperatively function with existing database systems having a wide variety of schemas.